Optimal. Leaf size=43 \[ \frac{a \sin (c+d x) \cos (c+d x)}{2 d}+\frac{a x}{2}-\frac{b \cos ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0281819, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {3486, 2635, 8} \[ \frac{a \sin (c+d x) \cos (c+d x)}{2 d}+\frac{a x}{2}-\frac{b \cos ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3486
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \cos ^2(c+d x) (a+b \tan (c+d x)) \, dx &=-\frac{b \cos ^2(c+d x)}{2 d}+a \int \cos ^2(c+d x) \, dx\\ &=-\frac{b \cos ^2(c+d x)}{2 d}+\frac{a \cos (c+d x) \sin (c+d x)}{2 d}+\frac{1}{2} a \int 1 \, dx\\ &=\frac{a x}{2}-\frac{b \cos ^2(c+d x)}{2 d}+\frac{a \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0538012, size = 46, normalized size = 1.07 \[ \frac{a (c+d x)}{2 d}+\frac{a \sin (2 (c+d x))}{4 d}-\frac{b \cos ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 41, normalized size = 1. \begin{align*}{\frac{1}{d} \left ( -{\frac{b \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{2}}+a \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.34818, size = 51, normalized size = 1.19 \begin{align*} \frac{{\left (d x + c\right )} a + \frac{a \tan \left (d x + c\right ) - b}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.84076, size = 86, normalized size = 2. \begin{align*} \frac{a d x - b \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.35676, size = 197, normalized size = 4.58 \begin{align*} \frac{2 \, a d x \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + 2 \, a d x \tan \left (d x\right )^{2} + 2 \, a d x \tan \left (c\right )^{2} - b \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - 2 \, a \tan \left (d x\right )^{2} \tan \left (c\right ) - 2 \, a \tan \left (d x\right ) \tan \left (c\right )^{2} + 2 \, a d x + b \tan \left (d x\right )^{2} + 4 \, b \tan \left (d x\right ) \tan \left (c\right ) + b \tan \left (c\right )^{2} + 2 \, a \tan \left (d x\right ) + 2 \, a \tan \left (c\right ) - b}{4 \,{\left (d \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + d \tan \left (d x\right )^{2} + d \tan \left (c\right )^{2} + d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]